package com.example.demo02

import android.os.Bundle
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity

class MainActivity: AppCompatActivity()
{
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.mainlayout)
        
        val button = findViewById<Button>(R.id.button2)
        val textView = findViewById<TextView>(R.id.textView)
        
        button.setOnClickListener {
            textView.text = getString(R.string.textview_active)
        }
    }
}